package com.ysy.controller;

import com.ysy.entity.req.FollowListReqDTO;
import com.ysy.entity.req.FollowReqDTO;
import com.ysy.entity.rsp.FollowListRspVO;
import com.ysy.persimmons.common.request.CursorPageBaseReq;
import com.ysy.persimmons.common.response.CursorPageBaseResp;
import com.ysy.persimmons.common.response.PageResponse;
import com.ysy.persimmons.common.response.Response;
import com.ysy.service.FollowService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户关注表 前端控制器
 * </p>
 *
 * @author yangSy
 * @since 2025-04-26
 */
@RestController
@RequestMapping("/follow")
public class FollowController {


    @Resource
    private FollowService followService;


    @PostMapping("/user")
    public Response<?> followUser(@RequestBody FollowReqDTO followDTO) {
      return  followService.followUser(followDTO);
    }

    @PostMapping("/cancel")
    public Response<?> cancelFollow(@RequestBody FollowReqDTO followDTO) {
        return  followService.cancelFollow(followDTO);
    }

    @PostMapping("/list")
    public PageResponse<FollowListRspVO> followList(@RequestBody FollowListReqDTO follow) {
        return  followService.followList(follow);
    }



}
